#coding:utf8

#文本对象是一个可迭代对象
f = open('test.txt')
# for i in f:
#     print i


from itertools import islice
i = islice(f, 0, 5)
for x in i:
    print x
    
#islice会对f进行消耗
for x in f:
    print x,"____________"